home *** CD-ROM | disk | FTP | other *** search
- on mouseDown
- global oPuppeteer, oStoryteller, gPeekPlayList, gCPU
- set pkScanIcon to 41
- set pkBarIcon to 42
- set pkAmberIcon to 43
- set peekText to 40
- if getState(oStoryteller, #houseLightsAreOn) = 0 then
- set peekVideo to getProp(the lsForegroundData of oPuppeteer, #PkVideoDark)
- else
- set peekVideo to getProp(the lsForegroundData of oPuppeteer, #PkVideoNormal)
- end if
- resetPeeKdisplay()
- if getState(oStoryteller, #BarOnline) = 1 then
- set the castNum of sprite 42 to getAt(getProp(the lsMultiFrames of oPuppeteer, #barIcon), 4)
- end if
- set textList to getProp(the lsMultiFrames of oPuppeteer, #peekText)
- set stateMsg to value("#bar" & getState(oStoryteller, #PKbarStatus))
- set the castNum of sprite 40 to getProp(textList, stateMsg)
- soundEffect(#peekButton)
- if gCPU = #PC then
- suspendSounds()
- end if
- updateStage()
- if getState(oStoryteller, #BarOnline) = 1 then
- set camSprite to 44
- set bailOut to 0
- repeat while the mouseDown
- updateStage()
- end repeat
- repeat with myClip in gPeekPlayList
- set clipNum to getaProp(peekVideo, myClip)
- if voidp(clipNum) then
- put ">•> Sorry, there's no clip available for #" & myClip
- put ">•> AMBERVISION is " & getState(oStoryteller, #AMBERVISION)
- put ">•> Are the house lights on? [" & getState(oStoryteller, #houseLightsAreOn) & "]"
- exit
- end if
- set the movieRate of sprite camSprite to 0
- set the castNum of sprite camSprite to clipNum
- updateStage()
- set the movieTime of sprite camSprite to 0
- set the movieRate of sprite camSprite to 1
- set totalTime to the duration of cast clipNum
- repeat while the movieTime of sprite camSprite < totalTime
- if stateMsg = #barnoActivity then
- if the mouseDown then
- set bailOut to 1
- set textList to getProp(the lsMultiFrames of oPuppeteer, #peekText)
- set the castNum of sprite peekText to getProp(textList, #none)
- resetPeeKdisplay()
- exit repeat
- end if
- end if
- updateStage()
- end repeat
- if bailOut = 1 then
- exit repeat
- end if
- end repeat
- end if
- buildDefaultPlaylist()
- if getState(oStoryteller, #BarOnline) then
- setProp(the lsStateData of oStoryteller, #PKbarStatus, [#noActivity])
- end if
- end
-